package com.ysh.ioc.service;

import com.ysh.ioc.model.Student;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    /*@Qualifier("s2")
    @Autowired
    private Student s1;*/

    //非spring注解，jdk的注解
    /*@Resource(name = "s5")
    private Student s1;*/

    @Autowired
    private Student s2;


    public void print(){
        System.out.println("do Service");
        System.out.println(s2);
    }
}
